<div class="print-receipt sales-receipt print-mode-text v-flow" style="position:fixed;top:10000px;">
    <p><span class="big-size-1hxl">{{title}}</span></p>
    <hr>
    <p class="text-center"><span class="big-size-1hxl" *ngIf="preOrder.extended && preOrder.extended.table">{{preOrder.extended.table.name}}</span></p>
    <p></p>
    <p class="text-center"><span *ngIf="store.merchant">{{store.merchant.storeName}}</span></p>
    <hr>
    <p><span>终端号：</span><span *ngIf="preOrder.terminalName">{{preOrder.terminalName}}</span></p>
    <p><span>时间：</span><span *ngIf="preOrder.createTime">{{preOrder.createTime | date:'yyyy-MM-dd hh:mm:ss'}}</span></p>
    <hr>
    <div class="rows" *ngIf="preOrder.description">
        <p class="pre-text">{{preOrder.description}}</p>
        <hr>
    </div>
    <p></p>
    <div class="p"><span class="item-quantity text-center">数量</span><span class="item-inventory-name">商品</span><span class="item-amount">金额</span></div>
    <hr>
    <div class="rows" *ngIf="preOrder.cart && preOrder.cart.items">
        <div class="rows" *ngFor="let item of preOrder.cart.items">
            <div class="p">
                <span class="item-quantity text-center">{{item.qty}}</span> 
                <span class="item-inventory-name">{{item.inventoryName}}</span>                
                <span class="item-amount">{{item.amount | number:'1.2-2'}}</span>
            </div>
            <div class="rows" *ngFor="let modItem of (item | printModSupFor)">
                <div class="p">
                    <div class="item-quantity text-right">+&nbsp;</div>
                    <div class="item-inventory-name auto-flex h-layout flex-wrap">
                        <span *ngFor="let opt of modItem.options;let index=index">
                            <span>{{opt.name}}</span>
                            <span *ngIf="opt.price && opt.price!=0">($&nbsp;{{opt.price | number: '1.2-2'}})</span>
                            <span *ngIf="index!=modItem.options.length-1">,&nbsp;</span>
                        </span>
                    </div>
                </div>
            </div>
            <div class="rows" *ngFor="let group of (item | printComboSupFor)">
                <div class="rows" *ngFor="let invt of group.items">
                    <div class="p">
                        <div class="item-quantity text-right">&nbsp;</div>
                        <div class="item-inventory-name auto-flex h-layout">
                            <span>
                                <span>{{invt.inventoryName}}</span>
                                <span *ngIf="invt.actualPrice">&nbsp;$&nbsp;{{invt.actualPrice | number:'1.2-2'}}</span>
                                <span *ngIf="invt.qty!=1">x{{invt.qty}}</span>
                            </span>
                        </div>
                    </div>
                    <div class="rows" *ngIf="invt.modifiers && invt.modifiers.items && invt.modifiers.items.length">
                        <div class="p h-layout" *ngFor="let item of invt.modifiers.items">
                            <div class="item-quantity text-right">&nbsp;</div>
                            <div style="width: 2em"></div>
                            <div><span>+</span></div>
                            <div class="auto-flex"><span *ngFor="let opt of item.options;let index=index;"><span>{{opt.name}}</span> <span *ngIf="opt.price&&opt.price!=0">($&nbsp;{{opt.price | number:'1.2-2'}})</span>                                <span *ngIf="index!=item.options.length-1">,&nbsp;</span></span>
                            </div>
                        </div>
                    </div>
                    <div class="rows" *ngIf="invt.extended.description">
                        <div class="p h-layout">
                            <div class="item-quantity text-right">&nbsp;</div>
                            <div style="width: 1em"></div>
                            <div><span>{{invt.extended.description}}</span></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="rows" *ngIf="item.extended.description">
                <div class="p h-layout">
                    <div style="margin-left: 1em"><span>&nbsp;&nbsp;{{item.extended.description}}</span></div>
                </div>
            </div>
        </div>
        <div class="p">
            <div>共计&nbsp;</div>
            <div class="b">{{preOrder.cart.items.length}}</div>
            <div>&nbsp;项</div>
        </div>
    </div>
    <hr>
    <p></p>
    <div class="p"><span>小计：</span><span *ngIf="preOrder.amountDue" class="item-price text-right big-size-1hxl auto-flex">$&nbsp;{{preOrder.amountDue | number:'1.2-2'}}</span></div>
    <hr>
</div>
<div dataBindSpy (dataBindFinish)="dataBindFinish()" *ngIf="preOrder && preOrder.cart && preOrder.cart.items && store && store.merchant"></div>